$(function() {


    var url = jumpUrl+'/lawyer/'+id+'/comments/questions';
    init();
    function init(){
        var loading = layer.msg('加载中...', {icon: 16});
        var str ="";
        $.get(url,function(data){
          
        }, "json").error(function(data) {
            layer.msg("请求失败！")
        }).success(function(data) {
            var obj = data.data;
            var comments = obj.comments;
            str +='<div class="sumComments">总计<label>'+comments.length+'</label>条评价。</div>';
            for(var i=0;i<comments.length; i++){
                str+='<dl class="artivleSharelist clear">'
                    str+='<dt><img class="userImg" src="'+jumpUrl+'/img/question/da.png" width="100" height="100" alt="" /></dt>'
                    str+='<dd class="title"><b>小刘心</b></dd>'
                    str+='<dd class="issuetxt">'+comments[i].content+'</dd>'
                    str+='<dd>'
                        str+='<div class="score">服务评价：'
                            str+='<img src="'+jumpUrl+'/img/star-on.png" alt="1" title="bad">&nbsp;'
                            str+='<img src="'+jumpUrl+'/img/star-on.png" alt="2" title="poor">&nbsp;'
                            str+='<img src="'+jumpUrl+'/img/star-on.png" alt="3" title="regular">&nbsp;'
                            str+='<img src="'+jumpUrl+'/img/star-off.png" alt="4" title="good">&nbsp;'
                            str+='<img src="'+jumpUrl+'/img/star-off.png" alt="5" title="gorgeous">'
                        str+='</div>'
                        str+='<label class="created_at">'+comments[i].created_at+'</label>'
                    str+='</dd>'
                str+='</dl>';  
            }
            $("#advisory").append(str);

        })
    }
});

